<%@ page language="java"
	import="java.util.*,com.opensymphony.xwork2.util.*"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>出栏录入</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript">
	function calculate(){
		var price=document.getElementById("price").value;//document.price.value;
		var weight=document.getElementById("chulan_weight").value;//document.chulan_weight.value;
		var sum= parseFloat(price)*parseInt(weight);
	
		document.getElementById("sum_of_price").value =sum;
	}
</script>
</head>
<body>
	<s:property value="tip" />
	<label>单体录入</label>
	<s:form action="chulandtluru" >
		<s:select name="jiaoyi_to" list="#session.buyermap" listKey="key"
			listValue="value" label="买家" />
		<s:textfield name="jiaoyi_time" label="交易时间" />
		<s:textfield id="price" name="price" label="单价" />
		<s:textfield id="chulan_weight" name="chulan_weight" label="出栏体重" onblur="calculate()"/>
		<s:textfield id="sum_of_price" name="sum_of_price" label="总价" onclick="calculate()" />
		<s:select name="fz_person" list="#session.yuangongmap" listKey="key"
			listValue="value" label="负责人" />
		<s:textfield name="eb_id" label="耳标号" />
		
		<s:submit value="提交" />
	</s:form>
	<label>批量录入</label>
	<s:form action="chulanzsluru">
		<s:select name="zs_id" list="#session.zhushemap" listKey="key"
			listValue="value" label="猪舍号" />
		<s:submit value="按猪舍录入" />
	</s:form>
	<s:form action="chulanzjluru">
		<s:select name="zj_id" list="#session.zhujuanmap" listKey="key"
			listValue="value" label="猪圈号" />
		<s:submit value="按猪圈录入" />
	</s:form>
</body>
</html>
